<%--
    Document   : home
    Created on : Oct 23, 2011, 5:06:42 PM
    Author     : Group 106
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" errorPage="error.jsp"%>
<%@page import="java.util.ArrayList" %>
<%@page import="java.util.List" %>
<%@page import="com.aptech.model.RealEstateType" %>
<%@page import="com.aptech.model.RealEstateStyle" %>
<%@page import="com.aptech.model.User" %>
<%@page import="com.aptech.model.realEstateInfo" %>
<%@page import="com.aptech.DAO.realEstateTypeDAO" %>
<%@page import="com.aptech.DAO.realEstateStyleDAO" %>
<%@page import="com.aptech.DAO.realEstateDAO" %>
<%@ taglib prefix="page" uri="/WEB-INF/tlds/phantrang.tld" %>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <link rel="stylesheet" href="CSS/css.css" />
       <!-- <link rel="stylesheet" href="CSS/css_header.css" /> -->
       <link href="CSS/msh_style.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" type="text/css" href="CSS/gallery_style.css" />
        <link rel="stylesheet" href="CSS/mn_left.css" />
        <link rel="stylesheet" href="CSS/mn_search.css" /> 
        <link rel="stylesheet" href="CSS/css_realEstateInfor.css" />
       <!-- <link rel="stylesheet" href="CSS/css_footer.css" /> -->
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="keywords" content="free css templates, real estate website, website templates, CSS, HTML" />
        <meta name="description" content="Free CSS Template for real estate websites, W3C compliant XHTML CSS layout" />
 <title>index Page</title>
    </head>
    <%
    System.out.println("Vao trang INDEX");
                User objUser = null;
                String userID = "";
                ArrayList<RealEstateType> listRealStateType = null;
                realEstateTypeDAO objRealEstateTypeDAO = null;
                if (request.getSession().getAttribute("user") != null) {
                    objRealEstateTypeDAO = new realEstateTypeDAO();
                    objUser = (User) request.getSession().getAttribute("user");
                    userID = objUser.getUserID() + "";
                    listRealStateType = new ArrayList<RealEstateType>();
                    listRealStateType = objRealEstateTypeDAO.getAllRealEstateType();
                    

    %>
    <body>

        <div id="wrap">
            <%@include file="header.jsp" %>
            <div class="clear"> </div><!--End .clear-->
            <div id="main">
                <div id="left_sidebar">
                    <%@include file="leftSidebar.jsp" %>
                </div><!--End #left_sidebar-->
                <div id="content">
                    <%@include file="search.jsp" %>
                    <div class="clear"></div><!--End .clear-->
                    <%@include file="houseInfo.jsp" %>
                </div><!--End #content-->
            </div><!--End #main-->
            
            
            <div id="msh_footer_panel" style="width: 942px;">
    Copyright © 2011 <a href="index.html">Ha Noi - Aptech</a> | <a href="home.jsp" target="_parent">Website My Sweet Home</a> by <a href="home.jsp" target="_blank">Group 106</a></div>
</div><!--End #wrap-->
    </body>
    <%
                } else {
                    response.sendRedirect("login.jsp");
                }
    %>
</html>